package com.starter.zspringbootautoconfigure;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration //标识为注解类
@EnableConfigurationProperties(ConfigProperties.class)//使configurationProperties生效
@ConditionalOnProperty(value = "z.config.info")//必须配置该属性
public class AutoConfigure {


	@Bean
	public Action action(ConfigProperties configProperties) {
		return new Action(configProperties);
	}


}
